<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>注册</title>
    <link rel="stylesheet" href="/WebYiZhi/Template/Home/Css/bootstrap.css"/>
<link rel="stylesheet" href="/WebYiZhi/Template/Home/Css/icheck.css"/>
<script src="/WebYiZhi/Template/Home/Js/jquery-2.1.1.js"></script>
<script src="/WebYiZhi/Template/Home/Js/bootstrap.js"></script>
<script type="text/javascript" src="/WebYiZhi/Public/Framework/hui/lib/jquery.form/3.46.0/jquery.form.js"></script>
<!--[if IE 6]>
<script type="text/javascript" src="lib/DD_belatedPNG_0.0.8a-min.js"></script>
<script>DD_belatedPNG.fix('.pngfix,.icon');</script>
<![endif]-->
<!--[if lt IE 9]>
<script src="http://cdn.bootcss.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="http://cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>

<![endif]-->
<script src="/WebYiZhi/Public/layer/layer.js"></script>
<!--自己的css-->
<link rel="stylesheet" href="/WebYiZhi/Template/Home/Css/login.css"/>
<link rel="stylesheet" href="/WebYiZhi/Template/Home/Css/style.css"/>
<script src="/WebYiZhi/Template/Home/Js/message.js"></script>
<script type="text/javascript" src="/WebYiZhi/Template/Home/Js/Validform_v5.3.2_min.js"></script>
<link rel="stylesheet" href="/WebYiZhi/Template/Home/Css/index.css"/>
<script src="/WebYiZhi/Template/Home/Js/Chart.js"></script>
<script src="/WebYiZhi/Template/Home/Js/Chart-1.0.1-beta.4.js"></script>
<script src="/WebYiZhi/Template/Home/Js/index.js"></script>
<script type="text/javascript" src="/WebYiZhi/Public/Framework/hui/lib/My97DatePicker/WdatePicker.js"></script>

</head>
<body>
<!--顶部开始-->
<header class="header">
    <div class="header_box">
        <div class="header_cont">
            <div class="head_l lt">您好！欢迎来到移植网</div>
            <div class="head_r rt"><a href="<?php echo U(login);?>">登录</a><a href="<?php echo U(register);?>">注册</a></div>
        </div>
    </div>
    <div class="header_logo">
        <div class="lt">
            <a href=""><img src="/WebYiZhi/Template/Home/Img/LOGO.png" alt=""/></a>
            <span>移植助手</span>
        </div>
        <div class="rt">
            <ul>
                <li>没有账号？<a href="<?php echo U(register);?>">立即注册</a><span>|</span></li>
                <li>忘记密码？<a href="<?php echo U(pwd);?>">立即找回</a></li>
                <li class="btn_index"><a href="<?php echo U(index);?>">返回介绍页</a></li>
            </ul>
        </div>
    </div>
</header>
<!--顶部结束-->
<!--主体内容开始-->
<div class="pwd_main register">
    <div class="row bt">
        <div class="col-xs-2"></div>
        <div class="col-xs-9"><span class="glyphicon glyphicon-edit" style="color: #e4393c; margin-right: 10px;"></span>免费注册</div>
    </div>
    <div class="row">
        <div class="col-xs-3"></div>
        <div class=" col-xs-9" style="margin:15px 0;">创建您的账号<span style="color: red;">（以下信息*皆为必填项，请认真填写）</span></div>
    </div>
    <form  class="form-horizontal va-m form Validform" id="demoform-1"   enctype="multipart/form-data" action="<?php echo U('DoctorInfo/reg');?>"  method="post">
        <div class="form-group">
            <label class="col-xs-4 control-label "><i style="color: #e4393c">*</i>&nbsp;&nbsp;手机号码：</label>
            <div class="col-xs-5">
                <!--<input type="text" value="" name="name" class="form-control" datatype="z2-4" nullmsg="请输入中文名！" errormsg="中文名为2~4个中文字符！" />-->
                <input type="text" class="form-control" name="phone"  id="phone" autocomplete="off" placeholder="请输入手机号码" datatype="m"  nullmsg="请输入手机号码" errormsg="请输入正确的手机号" value="">
            </div>
            <div class="col-xs-2">
            </div>
        </div>

        <div class="form-group">
            <label class="col-xs-4 control-label"><i style="color: #e4393c">*</i>&nbsp;&nbsp;验证码：</label>
            <div class="col-xs-2 ">
                <input type="text" class="form-control" autocomplete="off" disabled  name="messsagecode" id="messsagecode"  placeholder="请输入短信验证码" datatype="n6-6"  nullmsg="请输入短信验证码" errormsg="验证码为6位数字" >
            </div>
            <div class="col-xs-2">

            </div>
            <div class="col-xs-1" style="margin-left: -2.9%">
                <input class="btn btn-primary radius" type="button"  style="background: #00b683;border-color: #00b683" value="获取验证码" onclick="sendmsg(this)" >
            </div>
        </div>
        <div class="form-group">
            <label class="col-xs-4 control-label"><i style="color: #e4393c">*</i>&nbsp;&nbsp;登录密码：</label>
            <div class="col-xs-5">
                <input type="password" name="passwd" class="form-control" autocomplete="off" plugin="passwordStrength"  placeholder="登录密码" datatype="s6-12" nullmsg="请输入6-12位字符" errormsg="密码至少6个字符,最多12个字符">
            </div>
            <div class="col-xs-2">

            </div>
        </div>
        <div class="form-group">
            <label class="col-xs-4 control-label"><i style="color: #e4393c">*</i>&nbsp;&nbsp;重复密码：</label>
            <div class="col-xs-5">
                <input type="password" class="form-control" autocomplete="off" placeholder="请再输入一次密码!" datatype="s6-12" recheck="passwd" nullmsg="请再输入一次密码！" errormsg="您两次输入的账号密码不一致！" >
            </div>
            <div class="col-xs-2">
            </div>
        </div>
        <div class="form-group">
            <div class="col-xs-3"></div>
            <div class=" col-xs-9" style="margin:15px 0;">完善您的个人资料 <span style="color: red;">（以下信息*皆为必填项，请认真填写）</span></div>
        </div>
        <div class="form-group">
            <label class="col-xs-4 control-label"><i style="color: #e4393c">*</i>&nbsp;&nbsp;真实姓名：</label>
            <div class="col-xs-5">
                <input type="text" class="form-control" autocomplete="off" name="realname" placeholder="请输入您的姓名" datatype="*2-6" nullmsg="输入2-6位字符" errormsg="输入2-6位字符" value="">
            </div>
            <div class="col-xs-2">
            </div>
        </div>
        <div class="form-group">
            <label class="col-xs-4 control-label"><i style="color: #e4393c">*</i>&nbsp;&nbsp;职称：</label>
            <div class="col-xs-5">
                <select class="select form-control" size="1" name="titleid"  datatype="*" nullmsg="请选择您的职称">
                       <option value="">请选择</option>
                       <?php $_result=getlists(positioninfo);if(is_array($_result)): $i = 0; $__LIST__ = $_result;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?><option value="<?php echo ($v['id']); ?>"><?php echo ($v['name']); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                </select>
            </div>
            <div class="col-xs-2">
            </div>
        </div>
        <div class="form-group">
            <label class="col-xs-4 control-label"><i style="color: #e4393c">*</i>&nbsp;&nbsp;科室：</label>
            <div class="col-xs-5">
                   <select class="select form-control" size="1" name="officeid" datatype="*" nullmsg="请选择您的科室">
                      <option value="">请选择</option>
                       <?php $_result=getDepartmentinfoTree();if(is_array($_result)): $i = 0; $__LIST__ = $_result;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?><option value="<?php echo ($v['id']); ?>"  <?php if($v['pid'] == 0): ?>disabled<?php endif; ?>><?php echo ($v['name']); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                   </select>
            </div>
            <div class="col-xs-2">
            </div>
        </div>
        <div class="form-group">
            <label class="col-xs-4 control-label"><i style="color: #e4393c">*</i>&nbsp;&nbsp;所属医院：</label>

            <div class="formControl col-xs-5">
					<select class="select form-control" size="1"  name="hospitalid" datatype="*" nullmsg="请选择您所在的医院">
                        <option value="">请选择</option>
                         <?php $_result=getlists(hospitalinfo);if(is_array($_result)): $i = 0; $__LIST__ = $_result;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?><option value="<?php echo ($v['id']); ?>"><?php echo ($v['name']); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                    </select>
            </div>
            <div class="col-xs-2">

            </div>
        </div>
        <div class="form-group">
            <label class="col-xs-4 control-label"><i style="color: #e4393c"></i>&nbsp;&nbsp;医院地址：</label>
            <div class="col-xs-2">
                <select class="select form-control" size="1" id="provinceid"   name="provenceID" onchange="onchangeProvince($(this))">
                    <?php $_result=getaerainfoList();if(is_array($_result)): $i = 0; $__LIST__ = $_result;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$v): $mod = ($i % 2 );++$i;?><option value="<?php echo ($v['aerainfo_id']); ?>"><?php echo ($v['aerainfo_name']); ?></option><?php endforeach; endif; else: echo "" ;endif; ?>
                </select>
            </div>
            <div class="col-xs-2">
                <select class="select form-control" size="1" name="cityid"  onchange="onchangecity($(this))" id="city">
                    <option value="" selected="" disabled="disabled">请选择</option>
                </select>
            </div>
            <div class="col-xs-2">
                <select class="select form-control"  name="regionid"    id="district">
                    <option value="" selected="" disabled="disabled">请选择</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-xs-4 control-label"><i style="color: #e4393c">*</i>&nbsp;&nbsp;医师证照：</label>
            <div class="col-xs-5 ">
                <input type="file" class="form-control" autocomplete="off" placeholder="" name="certCover"  >
            </div>
            <div class="col-xs-2">
            </div>
        </div>
        <div class="form-group" style="margin:50px 0 80px 0">
            <div class="col-xs-2 col-xs-offset-4">
                <input class="btn btn-primary form-control" type="submit"  value="立即注册"   style="background: #00b683;border-color: #00b683;padding: 0 40px">
            </div>
        </div>
    </form>
    <div class="tishi_bottom va-m">
        <p style="font-weight: bold">已经注册？请
            <a href="<?php echo U(pwd);?>">点击这里</a> 忘记了密码？
            <span>请认真、仔细地填写您的信息，以便我们尽快审核资料！<b style="color:red;">*</b>为必填项</span>
        </p>
    </div>
</div>
<!--主体内容结束-->
<!--尾部开始-->
<div class="footer">
    <div class="footer_cont">
        <p>Copyright © 2008-2014 Change360.cn All Rights Reserved  陕西类星体信息科技有限公司</p>
        <p> 地址：陕西省西安市高新区高新一路正信大厦A座204室</p>
    </div>
</div>
<script>
    $(".Validform").Validform({
        tiptype:2
    });
</script>

<!--尾部结束-->
</body>

<script>
    function onchangeProvince(jqObj){
        var province_id = jqObj.val();
        var citycheck = $('#city');
        citycheck.html('');
        $.ajax({
            url: '<?php echo U("getCityListJson");?>?province_id=' + province_id,
            type: 'post',
            enctype: 'multipart/form-data',
            success: function (data) {
                $.each(data, function (i, item) {
                    citycheck.append('<option value="' + item.aerainfo_id + '" >' + item.aerainfo_name + '</option>');
//                    var diseaseHtml="<div class='skin-minimal check-box' style='width: 200px;margin-top: 5px'> <div class='check-box'> <input type='checkbox' name='disease_id[]' checked value='"+item.id+"'>"+item.title+"</div> </div>";
//                    diseaseBox.append(diseaseHtml);
                });
                onchangecity(citycheck);
            },
        });
    }
    function onchangecity(jqObj){
        var city_id = jqObj.val();
        var districtcheck = $('#district');
        var ajaxurl='<?php echo U("getDistrictJson");?>?city_id=' + city_id;
        districtcheck.html('');
        $.ajax({
            url:ajaxurl ,
            type: 'post',
            enctype: 'multipart/form-data',
            success: function (data) {
                $.each(data, function (i, items) {
                    districtcheck.append('<option value="'+ items.aerainfo_id + '" >'+ items.aerainfo_name + '</option>');
                });
            }
        });
    }
    /***
     * 发送验证码
     * @param obj
     */
    function  sendmsg(obj) {
        var ajaxurl = "<?php echo U(sendmsg);?>";
        $phone=$("#phone").val();
        if(verification($phone)){
            $("#messsagecode").removeAttr("disabled");
            $.ajax({
                url:ajaxurl,
                data:{
                    phone:$phone
                },
                type:"Post",
                dataType:"json",
                success:function(data){
                    layer.msg(data.msg)
                    settime(obj);
                }
            });
        }else{
            layer.msg('请输入正确的手机号!')
        }
    }
</script>
</html>